package com.jyxd.web.service.dictionary;

import com.jyxd.web.dao.dictionary.DutyDictionaryDao;
import com.jyxd.web.data.dictionary.DutyDictionary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class DuryDictionaryService {

    @Autowired
    private DutyDictionaryDao dutyDictionaryDao;

    public boolean insert(DutyDictionary dutyDictionary){
        return dutyDictionaryDao.insert(dutyDictionary);
    }

    public boolean update(DutyDictionary dutyDictionary){
        return dutyDictionaryDao.update(dutyDictionary);
    }

    public DutyDictionary queryData(String id){
        return dutyDictionaryDao.queryData(id);
    }

    public DutyDictionary queryDataByCode(String titleCode){
        return dutyDictionaryDao.selectDataByCode(titleCode);
    }

    public List<DutyDictionary> queryList(Map<String,Object> map){
        return dutyDictionaryDao.queryList(map);
    }

    public int queryNum(Map<String,Object> map){
        return dutyDictionaryDao.queryNum(map);
    }

    /**
     * 根据code查询病区字典对象
     * @param map
     * @return
     */
    public DutyDictionary queryDataByCode(Map<String,Object> map){
        return dutyDictionaryDao.queryDataByCode(map);
    }

    /**
     * 查询所有的字典数据 stats!=-1
     * @param map
     * @return
     */
    public List<DutyDictionary> queryDutyList(Map<String,Object> map){
        return dutyDictionaryDao.queryDutyList(map);
    }


}
